<?php
$tickA = Swoole\Timer::tick(1000, function($timer_id, $param1){
    static $i = 0;
    echo $param1 . ": ". microtime(true), PHP_EOL;
    $i++;
    if($i == 3){
        \Swoole\Timer::clear($timer_id);
    }
}, 'A');